<?php
/**
 *  Flvmeister
 *  a multi-format video transcoder class written in PHP5 
 *  Copyright (C) 2008  Marco Fischer <marco@flvmeister.com>
 * 
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by    
 *  the Free Software Foundation, either version 3 of the License, or
 *  any later version.
 * 
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
 *
 */

require_once "Zend/Loader.php";
Zend_Loader::registerAutoload();

$filter = new Flvmeister_Filter_Flvtool();
$filter->binary = '/usr/bin/flvtool2';

$encoder = new Flvmeister_Encoder_Ffmpeg( $filter );
$encoder->binary = '/usr/bin/ffmpeg';

$flvmeister = new Flvmeister( $encoder );

$vConfig = new Flvmeister_Config_Video();
$vConfig2 = new Flvmeister_Config_Video();
$vConfig2->vBitrate = Flvmeister_Formats_Video::BITRATE_2000K;

$tConfig = new Flvmeister_Config_Thumbnail();

$tConfig->inputFile         = 'Kittka_1.wmv';
$tConfig->outputPrefix      = 'kittka';
$tConfig->outputFolder      = 'test';

$tConfig2 = clone $tConfig;
$tConfig2->tResolution   = '320x240';

$job = new Flvmeister_Job();

$job->thumbnail         = array( $tConfig,
                                 $tConfig2
                               );
$job->video             = array( $vConfig, 
                                 $vConfig2 
                               );
                
                                             
$job->inputFile         = 'Kittka_1.wmv';
$job->outputPrefix      = 'kittka';
$job->outputFolder      = 'test';                           

$flvmeister->addCronjob($job);